// light dark

export default {
  namespaced: true,
  state: () => ({
    theme: 'dark'
  }),
  getters: {
    get: state => key => state[key]
  },
  mutations: {
    set(state, { key, data }) {
      state[key] = data
    }
  },
  actions: {
    setTheme({ commit }, data) {
      const key = 'theme'
      commit('set', { key, data })
    }
  }
}
